package edu.gatech.oad.mule;

import edu.gatech.oad.mule.model.GameStateMachine.GameState;
import edu.gatech.oad.mule.view.interfaces.RenderableBuilding;

/**
 * This class represents a tile that will allow the player to exit
 * the town map and return back to the world map
 *
 * @author Brendan McGarry, Dale Avery, D'Miria Collins, Natasha Parekh, Jaemin Park
 * @version %I%, %G%
 */
public class Exit extends Zone implements RenderableBuilding{

	/**
	 * This constructor creates a new exit tile.  It just
	 * passes everything up to zone
	 * 
	 * @param x The x-coordinate of the exit tile
	 * @param y The y-coordinate of the exit tile
	 * @param width The width of the exit tile
	 * @param height  The height of the exit tile
	 */
	public Exit(int x, int y, int width, int height){
		super(x, y, width, height);
	}//end constructor
	
	//====================
	//	RenderableBuilding
	//====================
	
	@Override
	public BuildingType getBuildingType() {
		return BuildingType.EXIT;
	}//end method getBuildingType

	@Override
	public int getCost() {
		return 0;
	}//end method getCost
	
	//====================
	//	Zone
	//====================
	
	@Override
	public void interact(Player p, GameState phase, int round, int time) {
		System.out.println(p.getName() + " exits. (" + getX() + "," + getY() + ") -> (" + getWidth() + "x" + getHeight() + ")");
	}//end method interact
	
}//end class Exit